---
layout: example.html
title: Interpolation
shortdesc: Example of data interpolation
docs: >
  Example of data resampling when using raster DEM (digital elevation model) data.
  The <code>interpolate: false</code> setting is used to disable interpolation of data values during
  reprojection and rendering. Elevation data is
  calculated from the pixel value returned by <b>getData</b>. For comparison a second map reprojected
  with interpolation enabled returns inaccurate elevations which are very noticeable close to 3107 meters
  due to how elevation is calculated from the pixel value.
tags: "disable image interpolation, xyz, maptiler, reprojection"
cloak:
  - key: get_your_own_D6rA4zTHduk6KOKTXzGB
    value: Get your own API key at https://www.maptiler.com/cloud/
---
<div class="wrapper">
  <div class="half">
    <h4>Not Interpolated</h4>
    <div id="map1" class="map"></div>
    <div>
      <label>
        Elevation
        <span id="info1">-</span> meters
      </label>
    </div>
  </div>
  <div class="half">
    <h4>Interpolated</h4>
    <div id="map2" class="map"></div>
    <div>
      <label>
        Elevation
        <span id="info2">-</span> meters
      </label>
    </div>
  </div>
</div>
